﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace FoodFight3D
{
    public class Holes
    {
        
        public Model HoleModel;
        int holeNum;
        public float rotationAngle;
        
        public Vector3 position;
        public bool occupied;

        public Holes(Model model, float x, float y, float z)
        {
            position.X = x;
            position.Y = y;
            position.Z = z;
            HoleModel = model;
            occupied = false;
            rotationAngle = 0.0f;
        }


        public void draw(Matrix world, Matrix view, Matrix projection)
        {
            for (int index = 0; index < HoleModel.Meshes.Count; index++)
            {
                ModelMesh mesh = HoleModel.Meshes[index];
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.PreferPerPixelLighting = true;
                    effect.EnableDefaultLighting();
                    effect.World = mesh.ParentBone.Transform * world;
                    effect.View = view;
                    effect.Projection = projection;
                }

                mesh.Draw();
            }

        }

    }
}
